//
// Created by wujehy on 2020/8/3.
//

#ifndef AUTH_RAFT_NETWORKBASE_H
#define AUTH_RAFT_NETWORKBASE_H

#include <handy/event_base.h>

class TCPServer;

class HttpServer;

class Client;

class NetWorkWarpper;

/**
 * @brief 网络 抽象基类
 */
class NetWorkBase
{
    friend class NetWorkWarpper;

protected:
    NetWorkWarpper *netWorkWarpper = nullptr;
    handy::MultiBase *multiBase = nullptr;
public:
    /**
     * @brief 反初始化 接口
     */
    virtual void deinit() = 0;

    /**
     * @brief 初始化接口
     */
    virtual void init() = 0;


    void sethander(handy::MultiBase *hander)
    {
        multiBase = hander;
    }

    void setNetWorkWarpper(NetWorkWarpper *hander)
    {
        netWorkWarpper = hander;
    }

    virtual ~NetWorkBase()
    {

    }


};

#endif //AUTH_RAFT_NETWORKBASE_H
